using System.IO;

namespace Lamar.IoC.Diagnostics;

internal class DividerLine : Line
{
    private readonly char _character;

    internal DividerLine(char character)
    {
        _character = character;
    }

    #region Line Members

    public void OverwriteCounts(CharacterWidth[] widths)
    {
        // no-op
    }

    public void Write(TextWriter writer, CharacterWidth[] widths)
    {
        foreach (var width in widths) writer.Write(string.Empty.PadRight(width.Width, _character));
    }

    #endregion
}